package com.klxedu.ms.gateway.security.authentication.impl;

import java.util.ArrayList;

import com.klxedu.ms.gateway.security.authentication.IAuthenticateRoles;
import com.klxedu.ms.gateway.security.authentication.IAuthenticatedUser;

/**
 * 
 * Title: AuthenticateRolesImpl<br>
 * Description: 获取用户资源<br>
 * Copyright @ 2011~2018 Goldgov .All rights reserved.<br>
 * 
 * @author GuoR
 * @createDate 2018年7月17日
 */
public class MockAuthenticateRolesImpl implements IAuthenticateRoles {
	
	@Override
	public AuthorizedRoles doDetails(IAuthenticatedUser user) {
		AuthorizedRoles authorizedDetails = new AuthorizedRoles();
		if(user.getLoginID().equals("wx")) {
			ArrayList<String >userRoles = new ArrayList<String>();
			userRoles.add("ADMIN");
			authorizedDetails.setUserRoles(userRoles);
		}
		return authorizedDetails;
	}
}
